home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / CONTAS2.PAK / CONTRVW.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  3KB  |  83 lines

  1. // ContrVw.h : interface of the CContainerView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CContainerItem;
  6.  
  7. class CContainerView : public CView
  8. {
  9. protected: // create from serialization only
  10.     CContainerView();
  11.     DECLARE_DYNCREATE(CContainerView)
  12.  
  13. // Attributes
  14. public:
  15.     CContainerDoc* GetDocument();
  16.     // m_pSelection holds the selection to the current CContainerItem.
  17.     // For many applications, such a member variable isn't adequate to
  18.     //  represent a selection, such as a multiple selection or a selection
  19.     //  of objects that are not CContainerItem objects.  This selection
  20.     //  mechanism is provided just to help you get started.
  21.  
  22.     // TODO: replace this selection mechanism with one appropriate to your app.
  23.     CContainerItem* m_pSelection;
  24.  
  25. // Operations
  26. public:
  27.     CContainerItem* HitTestItems(CPoint point);
  28.     void SetSelection(CContainerItem* pItem);
  29.     void SetupTracker(CContainerItem* pItem, CRectTracker* pTracker);
  30.  
  31. // Overrides
  32.     // ClassWizard generated virtual function overrides
  33.     //{{AFX_VIRTUAL(CContainerView)
  34.     public:
  35.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  36.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  37.     protected:
  38.     virtual void OnInitialUpdate(); // called first time after construct
  39.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  40.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  41.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  42.     virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support
  43.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  44.     //}}AFX_VIRTUAL
  45.  
  46. // Implementation
  47. public:
  48.     virtual ~CContainerView();
  49. #ifdef _DEBUG
  50.     virtual void AssertValid() const;
  51.     virtual void Dump(CDumpContext& dc) const;
  52. #endif
  53.  
  54. protected:
  55.  
  56. // Generated message map functions
  57. protected:
  58.     //{{AFX_MSG(CContainerView)
  59.         // NOTE - the ClassWizard will add and remove member functions here.
  60.         //    DO NOT EDIT what you see in these blocks of generated code !
  61.     afx_msg void OnSetFocus(CWnd* pOldWnd);
  62.     afx_msg void OnSize(UINT nType, int cx, int cy);
  63.     afx_msg void OnInsertObject();
  64.     afx_msg void OnCancelEditCntr();
  65.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  66.     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  67.     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  68.     afx_msg void OnEditClear();
  69.     afx_msg void OnUpdateEditClear(CCmdUI* pCmdUI);
  70.     afx_msg void OnEditCopy();
  71.     afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
  72.     afx_msg void OnEditPaste();
  73.     //}}AFX_MSG
  74.     DECLARE_MESSAGE_MAP()
  75. };
  76.  
  77. #ifndef _DEBUG  // debug version in ContrVw.cpp
  78. inline CContainerDoc* CContainerView::GetDocument()
  79.    { return (CContainerDoc*)m_pDocument; }
  80. #endif
  81.  
  82. /////////////////////////////////////////////////////////////////////////////
  83.